#ifndef BASE64_H
#define BASE64_H

#include <openssl/bio.h>
#include <openssl/buffer.h>
#include <openssl/evp.h>

#include <math.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <iostream>

/**
 * Base on OpenSSL 1.0.2k-fips
 */

class Base64Tools
{
public:
    static std::string base64Encode(const unsigned char *message, const size_t length);
    static std::vector<unsigned char> base64Decode(const char *encodedMessage, const size_t encodedMessageLength);
    static int calculateDecodedLength(const char *b64input, const size_t length);
};

#endif
